package cn.com.cifi.mars.common.exception;

import cn.com.cifi.mars.constant.CodeEnum;
import lombok.Data;
/**
 * @author yyd
 */
@Data
public class MsgException extends RuntimeException {

    public CodeEnum codeEnum;

    public MsgException(CodeEnum dictError) {
        super(dictError.getMessage());
        codeEnum = dictError;
    }

    public int getCode() {
        return codeEnum.getCode();
    }

    public String getMsg() {
        return codeEnum.getMessage();
    }

}
